<extend name="Public/common" />
<block name="body">
  <script type="text/javascript" src="__JS__/jquery-ui/jquery.ui.js"></script>
  <script type="text/javascript" src="__JS__/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="__JS__/jquery-ui/themes/ui-lightness/jquery.ui.css"  />
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>会员管理</h3>
      <ul class="tab-base">
        	<li><a href="{:U('index')}"><span>列表</span></a></li>
	        <li><a href="JavaScript:void(0);" class="current"><span>编辑</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form id="form1" method="post" enctype="multipart/form-data" name="form1">
    <input type="hidden" name="member_id" value="{$info['member_id']}" />
    <table class="table tb-type2">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="member_mobile">会员:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform">{$info['nickname']}</td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="openid">openID:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform">{$info['openid']}</td>
           <td class="vatop tips">微信OPENID</td>
        </tr>
                
        <tr>
          <td colspan="2" class="required"><label for="avatar">头像:</label></td>
        </tr>
        <tr class="noborder">
          <td colspan="2"><ul id="thumbnails" class="thumblists">
              <li id="{$key}" class="picture" >
                <input type="hidden" name="member_qrcode" value="{$info['member_qrcode']}" />
                <div class="size-64x64"><span class="thumb"><i></i><img src="{$info['avatar']}" onload="javascript:DrawImage(this,64,64);"/></span></div>
              </li>
            </ul></td>
        </tr>
        
       <tr>
          <td colspan="2" class="required"><label for="avatar">性别:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform">   
          <if condition="$info.gender eq 1">男
			<elseif condition="$info.gender eq 2"/>女
			<else />未知
		  </if></td>
          <td class="vatop tips">性别</td>
        </tr> 

        <tr>
          <td colspan="2" class="required">VIP:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
          	<label for="vip1" class="cb-enable <eq name='info.vip' value='1'>selected</eq>" ><span>是</span></label>
            <label for="vip0" class="cb-disable <eq name='info.vip' value='0'>selected</eq>" ><span>否</span></label>
            <input id="vip1" name="vip" <eq name='info.vip' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="vip0" name="vip" <eq name='info.vip' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform"></span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label for="vip_end_time">会员截止日期:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" name="vip_end_time" id="vip_end_time" class="txt date" style="width:100px;" value="{$info['vip_end_time']}"/></td>
          <td class="vatop tips">VIP会员截止日期</td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label for="vip_number">会员卡号:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{:getVipSN($info['member_id'])}" name="vip_number" id="vip_number" class="txt"></td>
          <td class="vatop tips">会员卡号,20位的数字，系统会自动生成</td>
        </tr>

      </tbody>
      <tfoot>
        <tr class="tfoot">
          <td colspan="15" ><a href="JavaScript:void(0);" class="btn" id="submit"><span>提交</span></a></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function(){
  $('#vip_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  $("#submit").click(function() {
		if ($("#form1").valid()) {
			$("#form1").submit();
		}
	});
});
</script>
</block>